const user = {
    id: 1,
    name: "xiaowang"
}
var newUser = new Proxy(user, {
    get: function (target, key, receiver) {
        console.log(`getting ${key}!`);
        return Reflect.get(target, key, receiver);  //
    },
    set: function (target, key, value, receiver) {
        console.log(`setting ${key}!`);
        return Reflect.set(target, key, value, receiver);
    }
});

console.log(newUser.name);
newUser.name = "xiaofei"
console.log("newUser",newUser.name);
console.log("user",user.name);

